<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Title</title>
</head>
<body>
<script>
    new Promise((resolve,reject)=>{
        // resolve(1)
        reject(1)
    }).then(
        value => {
            console.log('onResolved1',value)
            return 2
        },
        reason => {throw reason}
    ).then(
        value => {
            console.log('onResolved2',value)
            return 3
        },
        reason => {throw reason}
    ).then(
        value => {
            console.log('onResolved3',value)
        },
        reason => Promise.reject(reason)
    ).catch(
        reason => {
            // console.log('onRejected1',reason)
            // throw reason
            // return Promise.reject(reason)
            return new Promise(()=>{})
        }
    ).then(
        value => {
            console.log('onResolved3',value)
        },
        reason => {
            console.log('onRejected2',reason)
        }
    )
</script>
</body>
</html>
